package com.frcdi.qms.system.domain;

import com.frcdi.qms.common.annotation.Excel;
import com.frcdi.qms.common.annotation.PropertyMsg;
import com.frcdi.qms.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 数据备份对象 sys_database_backup
 *
 * @author semarl
 * @date 2022-02-11
 */
@ApiModel(value = "数据备份对象")
public class DatabaseBackup extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 备份名称 */
    @Excel(name = "备份名称")
    @ApiModelProperty("备份名称")
    @PropertyMsg(value = "备份名称")
    private String name;

    /** 大小 */
    @Excel(name = "大小")
    @ApiModelProperty("大小")
    @PropertyMsg(value = "大小")
    private String dbSize;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("时间")
    @PropertyMsg(value = "时间")
    private Date createTime;

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setDbSize(String dbSize)
    {
        this.dbSize = dbSize;
    }

    public String getDbSize()
    {
        return dbSize;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("dbSize", getDbSize())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
